package org.project.d.network.msg;

import lombok.Builder;
import lombok.Data;
import lombok.NonNull;
import org.project.d.network.msg.serializer.Serialized;

/**
 * @author lin
 * @version V1.0
 * @description
 * @date 2020/6/18 3:28 下午
 */
@Builder
@Data
public class Transmission{

    private Byte serializationType;

    @NonNull
    private CommandCode commandCode;

    @NonNull
    private Object message;

    private Serialized serialized;

    public void setCommandCode(CommandCode commandCode) {
        this.commandCode = commandCode;
    }

    public void setMessage(Object message) {
        this.message = message;
    }

    public CommandCode getCommandCode() {
        return commandCode;
    }

    public Object getMessage() {
        return message;
    }
}
